Hi @ghulam murtaza
Sending messages in team channels on behalf of other users in the organization is currently not supported, only on behalf of logged-in users, because application permissions are only available in migration, you need to create the team and channel in the migration state:
Import messages:
POST https://graph.microsoft.com/v1.0/teams/team-id/channels/channel-id/messages
{
"createdDateTime":"2019-02-04T19:58:15.511Z",
"from":{
"user":{
"id":"id-value",
"displayName":"Joh Doe",
"userIdentityType":"aadUser"
}
},
"body":{
"contentType":"html",
"content":"Hello World"
}
}
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.